package com.gxy.learn.design.model.create.singleton;

/**
 * @description: 单例 懒汉式
 * @author: gaoxueyong
 * @Date: 2022/11/6 17:07
 */
public class SingletonSluggard {
    private SingletonSluggard() {
    }

    private static SingletonSluggard instance;

    public static synchronized SingletonSluggard getInstance() {
        if (null == instance) {
            instance = new SingletonSluggard();
        }
        return instance;
    }
}
